Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Fixed some map quests #558

Merged
merged 3 commits into from
May 8, 2020
Merged

Fixed some map quests #558

merged 3 commits into from
May 8, 2020

Conversation

Noikar
Copy link
Contributor

@Noikar Noikar commented May 1, 2020

I affirm:

  • that I agree to Project Topaz's Limited Contributor License Agreement, as written on this date
  • that I've tested my code since the last commit in the PR, and will test after any later commits

Some weren't giving proper rewards or key item notifications. Will push more as we find them.

@Noikar Noikar changed the title ffs Fixed some map quests May 1, 2020
@@ -41,6 +41,7 @@ function onEventFinish(player, csid, option)
if csid == 521 and player:getQuestStatus(SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER) == QUEST_AVAILABLE then
player:addQuest(SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER)
elseif csid == 516 then
npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER, {ki = tpz.ki.MAP_OF_KING_RANPERRES_TOMB, title = tpz.title.DAYBREAK_GAMBLER, xp = 2000})
npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER, {ki = tpz.ki.MAP_OF_KING_RANPERRES_TOMB, title = tpz.title.DAYBREAK_GAMBLER, xp = 2000 * EXP_RATE})
player:messageSpecial(ID.text.KEYITEM_OBTAINED, tpz.ki.MAP_OF_KING_RANPERRES_TOMB) -- Map of King Ranperre's Tomb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xephera looks like npcUtil.completeQuests() already has exp rate baked in:

player:addExp(params["xp"] * EXP_RATE)

Copy link
Contributor

@ibm2431 ibm2431 May 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enums are equivalent, but the table that npcUtil.completeQuest takes is not~

    if params["keyItem"] ~= nil then
        npcUtil.giveKeyItem(player, params["keyItem"])
    end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I misunderstood table, thinking ki is a table (because our "enums" are tables) and totally missed that the argument input here is its own table.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's confusing. Wondering if npcUtil functions should be tweaked to accept both "ki" and "keyItem" as field names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the exp_rate thing but it doesn't give a key item notification regardless for whatever reason so I'm leaving that part in until we know why.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER, {keyItem = tpz.ki.MAP_OF_KING_RANPERRES_TOMB, title = tpz.title.DAYBREAK_GAMBLER, xp = 2000 * EXP_RATE}) didn't work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just gonna second that

player:messageSpecial(ID.text.KEYITEM_OBTAINED, tpz.ki.MAP_OF_KING_RANPERRES_TOMB) -- Map of King Ranperre's Tomb

shouldn't be needed if you change

npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER, {ki = tpz.ki.MAP_OF_KING_RANPERRES_TOMB, title = tpz.title.DAYBREAK_GAMBLER, xp = 2000})

to

npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.EXIT_THE_GAMBLER, {keyItem = tpz.ki.MAP_OF_KING_RANPERRES_TOMB, title = tpz.title.DAYBREAK_GAMBLER, xp = 2000})

notice the change from ki = tpz.ki.MAP_OF_KING_RANPERRES_TOMB to keyItem = tpz.ki.MAP_OF_KING_RANPERRES_TOMB

@ibm2431 ibm2431 added the reviewed Has been reviewed by at least one Staff Member label May 3, 2020
@Noikar
Copy link
Contributor Author

Noikar commented May 4, 2020 via email

@ibm2431
Copy link
Contributor

ibm2431 commented May 4, 2020

It's always been broken

@ibm2431 ibm2431 merged commit 8e85530 into project-topaz:release May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed Has been reviewed by at least one Staff Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants